#ifndef _BUOLA_CV_IO_CKINECT_H_
#define _BUOLA_CV_IO_CKINECT_H_

#include <buola/buola.h>

#ifndef BUOLA_HAVE_KINECT
    #error "kinect not supported in this build of buola"
#endif

#include <buola/utility/usignal.h>
#include <buola/image/format.h>
#include <buola/image/algorithm/calibration.h>

namespace buola { namespace cvi {

class CKinectDevice;
    
class CKinect
{
public:
    CKinect();
    ~CKinect();
    
    const img::CCameraParameters &CameraParameters()    {   return mCameraParameters;   }
    
    void Start();
    void Stop();
    std::pair<img::CImage_rgb8,img::CImage_gray32f> GetOne();
    
    USignal<void(const img::CImage_rgb8&,const img::CImage_gray32f&)> sImages;

    
private:
    CKinectDevice *mDevice;
    bool mStarted;
    img::CCameraParameters mCameraParameters;
};

/*namespace cvi*/ } /*namespace buola*/ }

#endif
